/*
Copyright (c) 2013. by Z. Chen
See LICENSE.txt for details.
*/

#ifndef __FW_FOUNDATION_H__
#define __FW_FOUNDATION_H__

#include <cstdint>
#include <cassert>
#include <cstring>
#include <string>
#include <vector>
#include <map>

#include "FWConfig.h"

#ifndef FW_NO_COPYCONSTRUCT
#define FW_NO_COPYCONSTRUCT(ClassName)	\
	private:	\
	ClassName( const ClassName& r );	\
	void operator=( const ClassName& r );
#endif

#define FW_sprintf sprintf_s

namespace freewrite
{

template<class T>
void FW_SAFE_DELETE(T*& pT)
{
	if(pT)
	{
		delete pT;
	}
	pT = nullptr;
}

struct Character;
struct FontFaceImpl;
struct FontLibraryImpl;
class Font;
class FontCache;
class FontMap;

struct Vector4U16
{
	uint16_t X;
	uint16_t Y;
	uint16_t Z;
	uint16_t W;
	Vector4U16() { }
	Vector4U16(uint16_t inX, uint16_t inY, uint16_t inZ, uint16_t inW) 
		: X(inX), Y(inY), Z(inZ), W(inW)
	{
	}
};

struct Vector2I16
{
	int16_t X;
	int16_t Y;
	Vector2I16() { }
	Vector2I16(int16_t inX, int16_t inY) : X(inX), Y(inY) { }
};

}

#include "Render.h"
#include "Font.h"
#include "FontCache.h"


#endif//__FW_FOUNDATION_H__